My Profile_


MCP Purchase Correction

NEW!   We now have our Interactive tool for this section.

Restores the full amount of a previous MCP Purchase or MCP Pre-Authorization Completion transaction to the cardholder's card, and removes any record of it from the cardholder's statement.

This transaction can be used against a Purchase or Pre-Authorization Completion transaction that occurred same day provided that the batch containing the original transaction remains open.

MCP processing uses the automated closing feature, and Batch Close occurs daily between 10 and 11 pm Eastern Time.

This transaction request is the multi-currency pricing (MCP) enabled version of the equivalent financial transaction..

MCP Purchase Correction transaction object definition

MCPPurchaseCorrection mcpPurchasecorrection = new MCPPurchaseCorrection();

HttpsPostRequest object for MCP Purchase Correction transaction

HttpsPostRequest mpgReq = new HttpsPostRequest();

mpgReq.setTransaction(mcpPurchasecorrection);

Canada Code Sample

package Canada;

import JavaAPI.*;

public class TestCanadaMCPPurchaseCorrection
{
	public static void main(String[] args)
	{
		String store_id = "store5";
		String api_token = "yesguy";
		String order_id = "Test1538682314339";
		String txn_number = "696314-0_11";
		String crypt = "7";
		String dynamic_descriptor = "123456";
		String processing_country_code = "CA";
		boolean status_check = false;

		MCPPurchaseCorrection mcpPurchasecorrection = new MCPPurchaseCorrection();
		mcpPurchasecorrection.setOrderId(order_id);
		mcpPurchasecorrection.setTxnNumber(txn_number);
		mcpPurchasecorrection.setCryptType(crypt);
		mcpPurchasecorrection.setDynamicDescriptor(dynamic_descriptor);
		mcpPurchasecorrection.setCustId("my customer id");

		HttpsPostRequest mpgReq = new HttpsPostRequest();
		mpgReq.setProcCountryCode(processing_country_code);
		mpgReq.setTestMode(true); //false or comment out this line for production transactions
		mpgReq.setStoreId(store_id);
		mpgReq.setApiToken(api_token);
		mpgReq.setTransaction(mcpPurchasecorrection);
		mpgReq.setStatusCheck(status_check);
		mpgReq.send();

		try
		{
			Receipt receipt = mpgReq.getReceipt();

			System.out.println("CardType = " + receipt.getCardType());
			System.out.println("TransAmount = " + receipt.getTransAmount());
			System.out.println("TxnNumber = " + receipt.getTxnNumber());
			System.out.println("ReceiptId = " + receipt.getReceiptId());
			System.out.println("TransType = " + receipt.getTransType());
			System.out.println("ReferenceNum = " + receipt.getReferenceNum());
			System.out.println("ResponseCode = " + receipt.getResponseCode());
			System.out.println("ISO = " + receipt.getISO());
			System.out.println("BankTotals = " + receipt.getBankTotals());
			System.out.println("Message = " + receipt.getMessage());
			System.out.println("AuthCode = " + receipt.getAuthCode());
			System.out.println("Complete = " + receipt.getComplete());
			System.out.println("TransDate = " + receipt.getTransDate());
			System.out.println("TransTime = " + receipt.getTransTime());
			System.out.println("Ticket = " + receipt.getTicket());
			System.out.println("TimedOut = " + receipt.getTimedOut());
			System.out.println("IsVisaDebit = " + receipt.getIsVisaDebit());
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}
}
                

Core connection object fields (all API transactions)

Variable Name Type and Limits Set Method Description
store ID

String

N/A

mpgReq.setStoreId(store_id); Unique identifier provided by Moneris upon merchant account set up.
API token

String

N/A

mpgReq.setApiToken(api_token);

Unique alphanumeric string assigned upon merchant account activation

To find your API token, refer to your test or production store’s Admin settings in the Merchant Resource Center, at the following URLs:

MCP Purchase Correction transaction request fields – Required

Variable Name Type and Limits Set Method Description
order ID

String

50-character alphanumeric a-Z A-Z 0-9 _ - : . @ spaces

mcpPurchasecorrection.setOrderId(order_id); Merchant-defined transaction identifier that must be unique for every Purchase, Pre-Authorization and Independent Refund transaction. No two transactions of these types may have the same order ID.

For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original transaction.

The last 10 characters of the order ID are displayed in the “Invoice Number” field on the Merchant Direct Reports. However only letters, numbers and spaces are sent to Merchant Direct.

A minimum of 3 and a maximum of 10 valid characters are sent to Merchant Direct. Only the last characters beginning after any invalid characters are sent. For example, if the order ID is 1234-567890, only 567890 is sent to Merchant Direct.

If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
transaction number

String

255-character, alphanumeric,hyphens or underscores

variable length

mcpPurchasecorrection.setTxnNumber(txn_number);

Used when performing follow-on transactions. (That is, Completion, Purchase Correction or Refund.) This must be the value that was returned as the transaction number in the response of the original transaction.

When performing a Completion, this value must reference the Pre-Authorization. When performing a Refund or a Purchase Correction, this value must reference the Completion or the Purchase.

electronic commerce indicator

String

1-character alphanumeric

mcpPurchasecorrection.setCryptType(crypt);

Describes the category of e-commerce transaction being processed. Allowable values are:


  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant

In Credential on File transactions where the request field e-commerce indicator is also being sent: the allowable values for e-commerce indicator are dependent on the value sent for payment indicator, as follows:


if payment indicator = R, then allowable values for e-commerce indicator: 2, 5 or 6
if payment indicator = C, then allowable values for e-commerce indicator: 1, 5, 6 or 7
if payment indicator = U, then allowable values for e-commerce indicator: 1 or 7
if payment indicator = Z, then allowable values for e-commerce indicator: 1, 5, 6 or 7

MCP Purchase Correction transaction request fields – Optional

Variable Name Type and Limits Set Method Description
customer ID

String

30-character alphanumeric

mcpPurchasecorrection.setCustId(cust_id);

This can be used for policy number, membership number, student ID, invoice number and so on.

This field is searchable from the Moneris Merchant Resource Centre

dynamic descriptor

String

max 20-character alphanumeric

total of 22 characters including your merchant name and separator

mcpPurchasecorrection.setDynamicDescriptor(dynamic_descriptor);

Merchant defined description sent on a per-transaction basis that will appear on the credit card statement. Dependent on the card Issuer, the statement will typically show the dynamic desciptor appended to the merchant's existing business name separated by the "/" character. Please note that the combined length of the merchant's business name, forward slash "/" character, and the dynamic descriptor may not exceed 22 characters.

-Example-

Existing Business Name: ABC Painting

Dynamic Descriptor: Booking 12345

Cardholder Statement Displays: ABC Painting/Booking 1